/* Element Plus 组件样式覆盖 */

/* 使用属性选择器和更高权重的选择器来覆盖el-card的hover效果 */
html body .el-card[class],
html body .el-card[class].is-hover-shadow,
html body .el-card[class].operation-card,
html body .el-card[class].table-card {
  transition: none !important;
}

html body .el-card[class]:hover,
html body .el-card[class].is-hover-shadow:hover,
html body .el-card[class].operation-card:hover,
html body .el-card[class].table-card:hover {
  transform: none !important;
  transition: none !important;
}

/* 使用!important强制覆盖动画效果 */
.el-card,
.el-card.is-hover-shadow,
.el-card.operation-card,
.el-card.table-card {
  transition-property: none !important;
  transition-duration: 0s !important;
  transition-timing-function: none !important;
  transition-delay: 0s !important;
  transform: none !important;
}

.el-card:hover,
.el-card.is-hover-shadow:hover,
.el-card.operation-card:hover,
.el-card.table-card:hover {
  transition-property: none !important;
  transition-duration: 0s !important;
  transition-timing-function: none !important;
  transition-delay: 0s !important;
  transform: none !important;
  box-shadow: var(--el-box-shadow-light) !important;
}

/* 确保卡片内所有元素不受动画影响 */
.operation-card,
.table-card {
  * {
    transition: none !important;
  }

  &:hover {
    box-shadow: var(--el-box-shadow-light) !important;
  }
}

/* 使用更高权重的选择器确保覆盖 */
.common-container .el-card.operation-card:hover,
.common-container .el-card.table-card:hover {
  transform: none !important;
  transition: none !important;
}

/* 暗黑模式下的菜单样式 */
.dark {
  /* 内容区背景色 */
  --el-bg-color: #141414;
  --el-bg-color-overlay: #1d1e1f;

  /* 菜单样式覆盖 */
  .el-menu {
    --el-menu-bg-color: rgba(0, 0, 0, 0.2) !important;
    --el-menu-text-color: #e5eaf3 !important;
    --el-menu-hover-bg-color: rgba(255, 255, 255, 0.05) !important;
    --el-menu-active-color: var(--el-color-primary) !important;
    border-right: none !important;
    background-color: transparent !important;
  }

  /* 弹出菜单 */
  .el-menu--popup {
    background-color: #1d1e1f !important;
  }

  /* 表格样式 */
  .el-table {
    --el-table-border-color: var(--el-border-color-lighter);
    --el-table-header-bg-color: rgba(0, 0, 0, 0.3) !important;
    --el-table-row-hover-bg-color: rgba(255, 255, 255, 0.08) !important;

    /* 确保表头文字明显 */
    th.el-table__cell {
      background-color: rgba(0, 0, 0, 0.3) !important;
      color: #e5eaf3 !important;
    }

    /* 表格行 */
    td.el-table__cell {
      border-bottom-color: var(--el-border-color-darker) !important;
    }
  }

  /* 对话框 */
  .el-dialog {
    background-color: var(--el-bg-color-overlay) !important;

    .el-dialog__header {
      color: var(--el-text-color-primary) !important;
    }
  }

  /* 表单 */

  /* 下拉菜单 */
  .el-dropdown-menu {
    background-color: var(--el-bg-color-overlay) !important;
  }

  /* 卡片 */
  .el-card {
    background-color: var(--el-bg-color-overlay) !important;

    .el-card__header {
      border-bottom: 1px solid var(--el-border-color-darker) !important;
    }
  }
}
